import URL from '@/config/url'
import utils from '@/utils/utils'

export default {
	//商品详情
	getGoodsDetail(params = {}) {
		let data = {
			order_code:params.order_code
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/order/detail', data })
	},

	//评价商品
	Comment(params) {
		let data = params
		return utils.uniRequest({ url: URL.BASE+ '/shop/comment/assessProduct', data })
	},
	
	//产品包详情
	GoodsPack(params = {}) {
		let data = {
			pack_id:params.pack_id
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/product/userPackDetail', data })
	},
	//产品包评价
	PackComment(params = {}) {
		// let data = {
		// 	pack_id:params.pack_id
		// }
		let data = params
		return utils.uniRequest({ url: URL.BASE+ '/shop/comment/assessPack', data })
	},
	
	//商品详情评价列表
	getProductCommentList(params = {}) {
		let data = {
			product_id:params.product_id,
			page:params.page,
			pagesize:params.pagesize
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/comment/getProductCommentList', data })
	},
	
	//产品包评价列表
	getPackCommentList(params = {}) {
		let data = {
			pack_id:params.pack_id
		}
		return utils.uniRequest({ url: URL.BASE+ '/shop/comment/getPackCommentList', data })
	},
}